<?php
/**
 *  Router Interface
 *
 *  Examples of usage:
 *  $router->route("/fr/admin/sampleModule/subrequestController/")
 *  The environment of the called controller will be:
 *  $languageSelector: "fr"
 *  $adminSelector: "admin"
 *  $moduleSelector: "sampleModule"
 *  $controllerSelector: "subrequestController"
 *
 */
interface Yz_Router_Interface
{

    /**
     *  @param string $path
     *  @param Yz_Array|null $args additional arguments
     *  @return Yz_HTTP_Response_Interface
     */
    public function route( $path, Yz_Array $args=null );

    /**
     *  @param Yz_HTTP_Request_Interface
     *  @return Yz_HTTP_Response_Interface
     */
    public function routeRequest( Yz_HTTP_Request_Interface $rq );

}
